package com.thb.pay.api.merchant;


import com.thb.pay.api.merchant.fallback.MchNotifyServiceApiFallbackFactory;
import com.thb.pay.api.merchant.vo.req.MchNotifyPageReq;
import com.thb.pay.api.merchant.vo.resp.MchNotifyVo;
import com.thb.pay.core.utils.PageResult;
import org.apache.commons.lang3.BooleanUtils;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "pay-service", fallbackFactory = MchNotifyServiceApiFallbackFactory.class)
@RequestMapping("/mchNotifyServiceApi")
public interface MchNotifyServiceApi {

    @RequestMapping(value = "/findPage", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    PageResult<MchNotifyVo> findPage(@RequestBody MchNotifyPageReq pageReq);


    @RequestMapping(value = "/findByOrderId", method = RequestMethod.GET)
    MchNotifyVo findByOrderId(@RequestParam("orderId") String orderId);


    @RequestMapping(value = "/resend", method = RequestMethod.GET)
    Boolean resend(@RequestParam("orderIds") String orderIds);
}
